package com.wu.other;

import org.mindrot.jbcrypt.BCrypt;

public class test {
	 public static void main(String[] args){
	    String password = "123456";
        //加密后的字符串
        String hashed = BCrypt.hashpw(password, BCrypt.gensalt());
        System.out.println(hashed);

        //检查
        if (BCrypt.checkpw(password, hashed))
            System.out.println("匹配成功");
        else
            System.out.println("匹配失败");
    }
}
